import fs from 'fs'

export default {
  sum(params) {
    return {
      content: [
        {
          type: 'text',
          text: `两数求和结果：${params.a + params.b}`
        }
      ]
    }
  },
  writeFile({ fileName, content }) {
    fs.writeFileSync(fileName, content)
    return {
      content: [
        {
          type: 'text',
          text: `文件${fileName}写入成功`
        }
      ]
    }
  }
}